package com.qfjy.homework.maleyi;

public class FactoryPatternDemo {
    public static void main(String[] args) {
        CarNameFactory carNameFactory = new CarNameFactory();

        CarName audi = carNameFactory.getCarName("Audi");
        audi.carDraw();

        CarName bmw = carNameFactory.getCarName("Bmw");
        bmw.carDraw();

        CarName benz = carNameFactory.getCarName("Benz");
        benz.carDraw();
    }
}
